package com.zzh.Proxy;

/**
 * @author 张占恒.
 * @date 2020/8/27.
 * @time 11:56.
 * 代理类
 */
public class Proxyimage implements Image {
    private Realimage realImage;
    private String fileName;

    public Proxyimage(String fileName){
        this.fileName = fileName;
    }

    @Override
    public void display() {
        if(realImage == null){
            realImage = new Realimage(fileName);
        }
        realImage.display();
    }
}
